<%@ page 
language="java" 
import="java.util.*" 
import="com.csd.helper.IConstant"
import="com.csd.vo.UserVO"
import="com.csd.vo.TeacherTaskVO"
pageEncoding="UTF-8"
%>
<%@page import="com.csd.pojo.EvaluateItem"%>
<%@page import="com.csd.pojo.ProjectType"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
HttpSession s = request.getSession();
UserVO uvo =  (UserVO)s.getAttribute(IConstant.userVO);
if(uvo==null || !uvo.getType().equals(IConstant.teacherRole))
{
	response.sendRedirect(path);
}
  List<Integer> scores =  (List<Integer>)request.getAttribute("scores");
  List<TeacherTaskVO> teacherHistory = (List<TeacherTaskVO>)request.getAttribute("teacherHistory");


Integer currPage = (Integer)request.getAttribute("currPage");
Integer totalPage = (Integer)request.getAttribute("totalPage");

if(currPage == null || currPage <= 0 )
	currPage = 1;
	
if(totalPage == null || totalPage <= 0)
	totalPage = 1;   
   
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>评审历史记录</title>
<link href="<%=path %>/teacher/css/teacher_right.css" rel="stylesheet" type="text/css" />
</head>

<body>
    <div class="main">
        <h1>评审历史记录</h1>
        <hr />
        <h3>&nbsp;</h3>
        <table width="100%">
          <tr>
            <td class="table_head" width="100px">项目类型</td>
            <td class="table_head" width="200px">项目名称</td>
            <td class="table_head" width="100px">负责人</td>
            <td class="table_head" width="200px">项目阶段</td>
            <td class="table_head">打分</td>
          </tr>
          <tr>
          <%
            if(teacherHistory != null){
                Iterator<Integer> j = scores.iterator();
          		for(Iterator<TeacherTaskVO> i = teacherHistory.iterator();i.hasNext();){ 
          			TeacherTaskVO teacherTask = i.next();
          			
          			if( teacherTask.getProjectType() != null) {%>
            <td height="32">
            	<%= teacherTask.getProjectType() %><%}else{%>
                 </td>
            	 <td height="32">  信息有误  </td>
            	<%} %>
                <%  if( teacherTask.getProjectName() != null){%>
            <td><%=teacherTask.getProjectName()%></td><%}else { %>
             <td height="32">  信息有误  </td>
            <%} %>
             
             <%  if( teacherTask.getLeader() != null){%>
            <td><%=teacherTask.getLeader()%></td>
            <%}else{%>
             <td height="32">  信息有误  </td>
             
            <%} %>
            <%  if( teacherTask.getEvaluateStage() != null){%>
            <td><%=teacherTask.getEvaluateStage()%></td><%}else { %>
             <td height="32">  信息有误  </td>
            <%} %>
            <%  Integer score = j.next();
            if( score != null){ %>
            <td><%=score%></td>
            <%}else{%>
             <td height="32">  信息有误  </td>
            <%} %>
          </tr><%}}else{%>
          <tr>
          	<td colspan="4" align="center">暂无记录</td>
          </tr>
          <%} %>
          <tr>
				<td colspan="4">
					<%if(currPage > 1){%>
					<a href="<%=path %>/teacherHistory.action?currPage=1">首页</a> |
					<a href="<%=path %>/teacherHistory.action?currPage=<%=currPage-1 %>">上一页</a> |
					<%} %>
					<span> 页面: <%=currPage %> </span>
					<%if(currPage < totalPage){%>
					| <a href="<%=path %>/teacherHistory.action?currPage=<%=currPage+1 %>">下一页</a>
					| <a href="<%=path %>/teacherHistory.action?currPage=<%=totalPage %>">尾页</a>
					<%} %>
				</td>
			</tr>
         
        </table>
    </div>
</body>
</html>
